package com.itheima.edu.info.manager.entry;

import com.itheima.edu.info.manager.thread.StudentSocketRunnable;
import com.itheima.edu.info.manager.thread.TeacherSocketRunnable;

import java.net.ServerSocket;
import java.net.Socket;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/*
服务器,
 */
public class StudentServerEntry {
    public static void main(String[] args) throws Exception {
        ExecutorService es = Executors.newFixedThreadPool(10);
        ServerSocket ss = new ServerSocket(10088);

        while (true) {
            Socket accept = ss.accept();
            StudentSocketRunnable sr = new StudentSocketRunnable(accept);
            es.submit(sr);

        }
    }
}